import request from '../../../utils/request'

export function labelPaginationListApi(page_size, current_page) {
  /**
   * 指定分页信息查询标签列表接口
  */
  return request({
    url: '/api/resources/label/?page_size=' + page_size + '&current_page=' + current_page,
    method: 'GET',
  })
}

export function labelSearchPaginationListApi(page_size, current_page, search_date) {
  /**
   * 指定分页信息查询学科列表接口
  */
  return request({
    url: '/api/resources/label/?page_size=' + page_size + '&current_page=' + current_page + '&search_data=' + search_date,
    method: 'GET',
  })
}

export function labelSearchApi(search_data) {
  /**
   * 指定查询内容获取标签接口
  */
  return request({
    url: '/api/resources/label/?search_data=' + search_data,
    method: 'GET',
  })
}

export function labelListApi() {
  /**
   * 标签列表接口
  */
  return request({
    url: '/api/resources/label/',
    method: 'GET',
  })
}

export function labelCreateApi(data) {
  /**
   * 标签创建接口
  */
  return request({
    url: '/api/resources/label/',
    method: 'POST',
    data: data,
  })
}


export function labelDeleteApi (data) {
  /**
   * 标签删除接口
  */
  return request({
    url: '/api/resources/label/' + data['id'] + '/',
    method: 'DELETE',
  })
}

export function labelUpdateApi (data) {
  /**
   * 标签更新接口
  */
  return request({
    url: '/api/resources/label/' + data['id'] + '/',
    method: 'PATCH',
    data: data
  })
}

export function labelDetailApi (data) {
  /**
   * 单个标签接口
  */
  return request({
    url: '/api/resources/label/' + data['id'] + '/',
    method: 'GET',
  })
}
